//
//  ViewController.m
//  GitPra
//
//  Created by 徐伟博 on 2017/10/19.
//  Copyright © 2017年 徐伟博. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor yellowColor];
    
    UILabel *lb = [[UILabel alloc] initWithFrame:CGRectMake(30, 100, 200, 40)];
    lb.text = @"git encourage branches.";
    [self.view addSubview:lb];
    
    UISwitch *sw7 = [[UISwitch alloc] initWithFrame:CGRectMake(30, 180, 0, 0)];
    [sw7 addTarget:self action:@selector(sw7Action:) forControlEvents:UIControlEventValueChanged];
    [self.view addSubview:sw7];
    
    UISlider *sld = [[UISlider alloc] initWithFrame:CGRectMake(30, 220, 300, 40)];
    [sld addTarget:self action:@selector(sldAction:) forControlEvents:UIControlEventValueChanged];
    [self.view addSubview:sld];
    
    // 1.建立远程仓库, 并且创建远程develop分支
    // 2.用source tree把远程仓库克隆到本地
    // 3.克隆完成后, 在source tree上只能看到master分支, 点击左上方"检出" -> "检出新分支", 选择远程的develop分支, 点确定, 这就把远程的develop分支也拿下来了, 并且自动切换到了develop
    // 4.开始进行任务, 完成后, 别急着commit, 先拉取一下远程的develop分支, 因为别人可能更新了代码, 若无冲突, 真幸运, 提交你的代码, 并且推送到远程develop分支; 若有冲突, OMG, 跟小伙伴沟通解决一下, 解决之后你提交代码, 然后推送到远程develop分支. 这样反复做
    // 5.开发任务告一段落后, 随便找个小伙伴切换到他的本地master分支, 右击develop分支, 合并到master, 再把本地maser推送到远程master, 大功告成.
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    NSLog(@"haha");
}

- (void)sw7Action:(UISwitch *)sw7 {
    if (sw7.isOn) {
        NSLog(@"开");
    } else {
        NSLog(@"关");
    }
}

- (void)sldAction:(UISlider *)sld {
    NSLog(@"%.2f", sld.value);
}


@end
